package org.smarthings.things.management.rest.resources;

import java.net.URI;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.smarthings.things.commons.rest.IdentifiableResource;

@XmlType(name = "thing")
@XmlRootElement(name = "thing")
public class ThingResource extends IdentifiableResource {

	private int state;
	private String type;
	private URI unregister;

	// FIXME maybe use action[] and property[] instead of uris
	// consider thing registration resource format
	private URI actions;
	private URI properties;

	@XmlElement(name = "state", required = true)
	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	@XmlElement(name = "type", required = false)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@XmlElement(name = "actions", required = false)
	public URI getActions() {
		return actions;
	}

	public void setActions(URI actions) {
		this.actions = actions;
	}

	@XmlElement(name = "properties", required = false)
	public URI getProperties() {
		return properties;
	}

	public void setProperties(URI properties) {
		this.properties = properties;
	}
	
	public URI getUnregister() {
		return unregister;
	}
	
	@XmlElement(name = "unregister", required = false)
	public void setUnregister(URI unregister) {
		this.unregister = unregister;
	}

}
